/*
 * $Id: QELogWindowFields.m 248 2008-09-08 15:31:38Z jon $
 * Sleeper
 *
 * Created by Jon Gordon on 7/27/08
 * Copyright Jon Gordon.  All rights reserved.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining 
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including 
 * without limitation the rights to use, copy, modify, merge, publish, 
 * distribute, sublicense, and/or sell copies of the Software, and to 
 * permit persons to whom the Software is furnished to do so, subject to 
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */


#import "QELogWindowFields.h"


@implementation QELogWindowFields
#pragma mark CREATION/DESTRUCTION
- (id)initWithCurrentTime:(NSDate *)newCurrentTime
                 entrySrc:newEntrySrc
                     call:newCall
               serialRcvd:newSerialRcvd
                     freq:newFreq
                    check:newCheck
                     prec:newPrec
                  section:newSection
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    self = [super init];
    if (self) {
        [self setCurrentTime:newCurrentTime];
        [self setEntrySrc:newEntrySrc];
        [self setCall:newCall];
        [self setSerialRcvd:newSerialRcvd];
        [self setFreq:newFreq];
        [self setCheck:newCheck];
        [self setPrec:newPrec];
        [self setSection:newSection];
        [self setOutExchange:@""];
    } // if
    return self;
} // initWithCurrentTime:entrySrc:


- (id)init
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    return [self initWithCurrentTime:nil 
                            entrySrc:nil
                                call:nil
                          serialRcvd:nil
                                freq:nil
                               check:nil
                                prec:nil
                             section:nil];
} // init


- (void)dealloc
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    [self setCurrentTime:nil];
    [self setEntrySrc:nil];
    [self setCall:nil];
    [self setSerialRcvd:nil];
    [self setFreq:nil];
    [self setCheck:nil];
    [self setPrec:nil];
    [self setSection:nil];
    [self setOutExchange:nil];
    
    [super dealloc];
} // dealloc


#pragma mark PUBLIC FIELDS
- (NSDate *)currentTime
{
    //    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    return [[currentTime retain] autorelease];
} // currentTime

- (void)setCurrentTime:(NSDate *)newValue
{
    //    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != currentTime) {
        id temp = currentTime;
        currentTime = [newValue copy];
        [temp release];
    } // if
} // setCurrentTime:


- (NSString *)entrySrc
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    return [[entrySrc retain] autorelease];
} // entrySrc

- (void)setEntrySrc:(NSString *)newValue
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != entrySrc) {
        id temp = entrySrc;
        entrySrc = [newValue copy];
        [temp release];
    } // if
} // setEntrySrc:


- (NSString *)call
{
    return [[call retain] autorelease];
} // call

- (void)setCall:(NSString *)newValue;
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != call) {
        id temp = call;
        call = [newValue copy];
        [temp release];
    } // if
} // setCall:


- (NSNumber *)serialRcvd
{
    return [[serialRcvd retain] autorelease];
} // serialRcvd

- (void)setSerialRcvd:(NSNumber *)newValue;
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != serialRcvd) {
        id temp = serialRcvd;
        serialRcvd = [newValue copy];
        [temp release];
    } // if
} // setSerialRcvd:


- (NSNumber *)freq
{
    return [[freq retain] autorelease];
} // freq

- (void)setFreq:(NSNumber *)newValue
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != freq) {
        id temp = freq;
        freq = [newValue copy];
        [temp release];
    } // if
} // setFreq:


- (NSNumber *)check
{
    return [[check retain] autorelease];
} // check

- (void)setCheck:(NSNumber *)newValue
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != check) {
        id temp = check;
        check = [newValue copy];
        [temp release];
    } // if
} // setCheck:


- (NSString *)prec
{
    return [[prec retain] autorelease];
} // prec

- (void)setPrec:(NSString *)newValue
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != prec) {
        id temp = prec;
        prec = [newValue copy];
        [temp release];
    } // if
} // setPrec:


- (NSString *)section
{
    return [[section retain] autorelease];
} // section

- (void)setSection:(NSString *)newValue
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != section) {
        id temp = section;
        section = [newValue copy];
        [temp release];
    } // if
} // setSection:


- (NSString *)outExchange
{
    return [[outExchange retain] autorelease];
} // outExchange

- (void)setOutExchange:(NSString *)newValue
{
    NSLog(@"MESSAGE: %s", __PRETTY_FUNCTION__);
    if (newValue != outExchange) {
        id tmp = outExchange;
        outExchange = [newValue copy];
        [tmp release];
    } // if
} // setOutExchange:
@end
